const mongoose = require('./db')
const Schema = mongoose.Schema
const nodeSchema = new Schema({
    // 名称
    name: {
        type: String,
        required: true
    },
    // 层级, 章1节2小节3
    level: {
        type: Number,
        required: true,
        default: 1
    },
    children: [this],
    // 专业类型
    subjectType: {
        type: Number,
        required: true,
        default: 8
    }
})

module.exports = NodeModel = mongoose.model('pdf_node', nodeSchema)
